package com.yanghui.dtracing.log;

import com.yanghui.dtracing.core.log.ILog;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class LogbackLog implements ILog {

	private final Logger log;
	
	public LogbackLog(Class<?> targetClass) {
		log = LoggerFactory.getLogger(targetClass);
	}

	@Override
	public void info(String message, Object... arguments) {
		log.info(message, arguments);
	}

	@Override
	public void error(String message, Throwable t) {
		log.error(message, t);
	}

	@Override
	public void error(String message, Object... arguments) {
		log.error(message,arguments);
	}

	@Override
	public void warn(String format, Object... arguments) {
		log.warn(format,arguments);
	}

	@Override
	public boolean isDebugEnable() {
		return log.isDebugEnabled();
	}

	@Override
	public void debug(String message, Throwable t) {
		log.debug(message,t);
	}

	@Override
	public void debug(String message, Object... arguments) {
		log.debug(message,arguments);
	}
}
